package com.work.shart.common.mybatis.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;


@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class BaseEntity<T> implements Serializable {

    public static String id_ = "id";
    public static String create_BY = "create_by";
    public static String create_date = "create_date";
    public static String update_by = "update_by";
    public static String update_date = "update_date";
    @TableId(value = "id",type = IdType.INPUT)
    private T id;

    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private LocalDate createDate;

    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @TableField(value = "update_date", fill = FieldFill.INSERT_UPDATE)
    private LocalDate updateDate;

    @TableLogic
    private Integer delFlag;
}

